<?php
if (!defined('ADMIN_INIT'))
	exit ('Access Denied!');

require_once ('db_name.inc.php');
require_once ('plugins/adodb/adodb.inc.php');
if (is_object($conn) == false) {
	$conn = & ADONewConnection('mysqli');
	$conn->Connect($_SERVER["kkyooDB_HOST"],$_SERVER["kkyooDB_NAME"],$_SERVER["kkyooDB_PASS"], DB_NAME_ADMIN);
	$conn->debug = false;
}

$db_admin = new mysqli($_SERVER["kkyooDB_HOST"],$_SERVER["kkyooDB_NAME"],$_SERVER["kkyooDB_PASS"], DB_NAME_ADMIN);
if (mysqli_connect_errno()) {
	exit ('Connection Failure!');
}

function close_conn($link) {
	mysqli_close($link);
}

function free_result($result) {
	mysqli_free_result($result);
}

function next_result($link) {
	mysqli_next_result($link);
}

function fetch_array($result) {
	$i = 0;
	while ($row = $result->fetch_array()) {
		$row_arr[$i] = $row;
		$i++;
	}
	return $row_arr;
}
?>